<?php

namespace App\Kuafu\Mqtt\Command;

use App\Kuafu\Export\Model\ExportDownloadModel;
use App\Kuafu\Mqtt\Enum\MqttCodeEnum;
use App\Kuafu\Nsq\Enum\NsqCodeEnum;
use App\Kuafu\User\Model\User;
use App\Library\FeiShu\SendFs;
use App\Support\MQTT;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Kuafu\GeneralFs\BuildFs;
use Kuafu\Nsq\NsqSubscriber;
use NSQClient\Contract\Message;

class StartMqttSubscribe extends Command
{
    protected $signature = 'mqtt:start-mqtt-subscribe {connectType}';

    protected $description = 'NSQ订阅mqtt订阅';

    public function handle()
    {
        ini_set('memory_limit', '2G');

        $connectType = $this->argument('connectType');

        (new MQTT())->subscribe($connectType);
    }
}
